﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Threading;
using UnityEngine;

public class _43 : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        ISalaryA<ProgrammerA> s = new BaseSalaryCounterA<ProgrammerA>();
        PrintSalary(s);
    }

    public void PrintSalary(ISalaryA<ProgrammerA> salary)
    {
        salary.Pay();
    }

    // Update is called once per frame
    void Update()
    {

    }
}

public interface ISalaryA<out T>
{
    void Pay();
}

public class BaseSalaryCounterA<T> : ISalaryA<T>
{
    public void Pay()
    {
        Debug.LogError("Pay Base Salary");
    }
}

public class EmployeeB
{
    public string Name { set; get; }
}

public class ProgrammerA : EmployeeA
{
    
}

public class ManagerA : EmployeeA
{
    
}


